home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / _archvrs / unix / unzip51 / amiga / lmkfile < prev    next >
Encoding:
Text File  |  1992-10-12  |  3.7 KB  |  120 lines

  1. # Makefile for UnZip 5.x using SAS/C 5.10a
  2. #   last revised:  11 Sep 92
  3. #
  4. # Updated to AmigaDOS 1.3 & 2.04, SAS/C 5.10b
  5. # August 1992  (John Bush <J.Bush@MD-B.Prime.COM>)
  6. #   - Selected unix equivalent routines via USTUFF variable to
  7. #     reduce runfile size when not called.
  8. #   - Re-did compiler options, and invented the AMIGADOS2 switch.
  9. #   - Removed dependency on "-DUNIX", now require -DAMIGA
  10. # Sept 6-7, 1992 (J.Bush)
  11. #   - Incorporated filedate.c
  12. #   - stat() and utime() elimintated
  13. #   - Added DBG macros
  14. #   - Removed useless $(O) and $(EXE) macros
  15. #   - Created REV and DOSFLAG macros.
  16. #        REV selects suffix for executable.
  17. #        DOSFLAG can be "-DAMIGADOS2" for version 2.x, or
  18. #                       "-DAMIGA" for version 1.3.x compatibility.
  19. #        These flags can be overridden on the LMK command line.  Eg:
  20. #
  21. #     To Make for 1.3, "lmk -f amiga/lmkfile REV=_1.3 DOSFLAG=-DAMIGA
  22. #     To Make for 2.x, "lmk -f amiga/lmkfile REV=_2.0 DOSFLAG=-DAMIGADOS2
  23. #     See "MakeScript" AmigaDOS script.
  24. #
  25. # NOTE:  decryption (full versions of crypt.c, crypt.h) is not yet
  26. #   supported.  In particular, code to prevent password echoing is
  27. #   desirable, and even if echoing is allowed, the echo-related pre-
  28. #   processor stuff in crypt.c is almost certain to cause compiler
  29. #   warnings/errors.
  30. #
  31. #####################
  32. # MACRO DEFINITIONS #
  33. #####################
  34.  
  35. # OPTIONS:  reorganize comments depending upon selection
  36.  
  37. # Suffix for executable -- (_1.3 or _2.0 or whatever you want)
  38. REV = _1.3
  39. # REV = _2.0
  40.  
  41. # Dos flag -- set to -DAMIGADOS2 2.x systems (w/v.36 ROM and above).
  42. # Set to -DAMIGA only on 1.3 systems (w/less than v.36 ROM).
  43. DOSFLAG = -DAMIGA
  44. # DOSFLAG = -DAMIGADOS2
  45.  
  46. CC = lc
  47. OPT = -O
  48. CFLAGS = $(OPT) $(DOSFLAG) -DPROTO -v -mat -cuisf -b0  -j85i86i87i100i
  49. LD = blink
  50. LDFLAGS =  FROM LIB:c.o
  51. LDFLAGS2 = LIB LIB:lc.lib+LIB:amiga.lib
  52.  
  53. # Compiler and loader debug flags.  Swap comments as req'd.
  54. # Do not set when building production version.
  55. # CDBG = -d3
  56. # LDBG = ADDSYM
  57.  
  58. #UnZip Objects
  59. OBJS = unzip.o crypt.o envargs.o explode.o extract.o file_io.o inflate.o \
  60.        mapname.o match.o misc.o unreduce.o unshrink.o filedate.o
  61.  
  62. #ZipInfo Objects
  63. IOBS = zipinfo.o envargs.o match.o misc.ozi   # misc.ozi: compiled w/ -DZIPINFO
  64.  
  65. #FUnZip Objects
  66. FOBS = funzip.o crypt.ofu inflate.o           # crypt.ofu: compiled w/ -DFUNZIP
  67.  
  68. ###############################################
  69. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  70. ###############################################
  71.  
  72. all: unzip funzip zipinfo
  73.  
  74. unzip: unzip$(REV)
  75.  
  76. .c.o :
  77.         $(CC) -o$@ $(CFLAGS) $(CDBG) $*.c
  78.  
  79. .c.ozi :
  80.         $(CC) -o$*.ozi -DZIPINFO $(CFLAGS) $(CDBG) $*.c
  81.  
  82. .c.ofu :
  83.         $(CC) -o$*.ofu -DFUNZIP $(CFLAGS) $(CDBG) $*.c
  84.  
  85. unzip$(REV):    $(OBJS)
  86.         $(LD) TO UnZip$(REV) $(LDFLAGS) $(OBJS) $(LDFLAGS2) $(LDBG)
  87.  
  88. funzip:   $(FOBS)
  89.         $(LD) TO FUnZip $(LDFLAGS) $(FOBS) $(LDFLAGS2)
  90.  
  91. zipinfo:  $(IOBS)
  92.         $(LD) TO ZipInfo $(LDFLAGS) $(IOBS) $(LDFLAGS2)
  93.  
  94. clean:
  95.         -delete $(OBJS)
  96.         -delete $(FOBS)
  97.         -delete $(IOBS)
  98.  
  99. # objects common to all revisions/ports:
  100. crypt.o:        crypt.c unzip.h zip.h crypt.h
  101. crypt.ofu:      crypt.c unzip.h zip.h crypt.h
  102. envargs.o:      envargs.c unzip.h
  103. explode.o:      explode.c unzip.h
  104. extract.o:      extract.c unzip.h crypt.h
  105. file_io.o:      file_io.c unzip.h crypt.h
  106. funzip.o:       funzip.c unzip.h crypt.h
  107. inflate.o:      inflate.c unzip.h
  108. mapname.o:      mapname.c unzip.h
  109. match.o:        match.c unzip.h
  110. misc.o:         misc.c unzip.h
  111. misc.ozi:       misc.c unzip.h
  112. unreduce.o:     unreduce.c unzip.h
  113. unshrink.o:     unshrink.c unzip.h
  114. unzip.o:        unzip.c unzip.h crypt.h
  115. zipinfo.o:      zipinfo.c unzip.h
  116.  
  117.  
  118. # objects specific to Amiga
  119. filedate.o:     amiga/filedate.c        # only used if AMIGADOS2 not defined
  120.